//
//  WBEmoticonModel.m
//  WeiBoOC
//
//  Created by 韩菲菲 on 16/8/20.
//  Copyright © 2016年 韩菲菲. All rights reserved.
//

#import "WBEmoticonModel.h"

@implementation WBEmoticonModel

- (instancetype)initWithDictionary:(NSDictionary *)dict
{
    if(self = [super init])
    {
        
        [self setValuesForKeysWithDictionary:dict];
        
    }
    
    return self;
    
}

- (void)setType:(NSString *)type
{
    _type = type;
    
    if([type isEqualToString:@"0"])
    {
        self.isEmoji = NO;
    }else
    {
        
        self.isEmoji = YES;
    }
}

//防止KVC报错
- (void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    
}

+ (instancetype)emoticonModelWithDictionary:(NSDictionary *)dict
{
    return [[self alloc] initWithDictionary:dict];
    
}

@end
